package com.platform.user.center.portal.util;

import com.github.pagehelper.PageInfo;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by churcy on 2017/6/3.
 */
public class PageUtils {
    public static Object formatPage(PageInfo page) {
        Map<String, Object> result = new HashMap<>();
        result.put("pageSize", page.getPageSize());
        result.put("pageNum", page.getPageNum());
        result.put("pages", page.getPages());
        result.put("total", page.getTotal());
        return result;
    }

}
